'\" te
.\" Copyright (c) 1982-2007 AT&T Knowledge Ventures
.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
.\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.TH REV 1 "Aug 11, 2009"
.SH NAME
rev \- reverse the characters or lines of one or more files
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/rev\fR [\fB-l\fR] [\fIfile\fR...]
.fi

.SS "ksh93"
.LP
.nf
rev [-\fBl\fR] [\fIfile\fR...]
.fi

.SH DESCRIPTION
.sp
.LP
\fBrev\fR copies one or more files to standard output, reversing the order of
characters on every line of the file, or reversing the order of lines of the
file if \fB-l\fR is specified
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.br
.na
\fB\fB--line\fR\fR
.ad
.RS 10n
Reverse the order of the lines of the file, instead of characters.
.RE

.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIfile\fR\fR
.ad
.RS 8n
Specifies the name of the file to use as input.
.sp
If \fIfile\fR is not specified, or if \fIfile\fR is a \fB-\fR, \fBrev\fR copies
from standard input starting at the current offset.
.RE

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
All files copied successfully.
.RE

.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
One or more files did not copy.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	Enabled
_
Interface Stability	Committed
.TE

.SH SEE ALSO
.sp
.LP
.BR cat (1),
.BR ksh93 (1),
.BR tail (1),
.BR attributes (7)
